home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14995 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Integers -> Pointers -> Integers
  5. Date: 16 Apr 1996 16:50:24 GMT
  6. Organization: OpenVision
  7. Message-ID: <4l0j4g$ca@spanky.pls.ov.com>
  8. References: <DpoyFt.Ls2@uns.bris.ac.uk>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article Ls2@uns.bris.ac.uk, chris@pact.srf.ac.uk (Chris Davis-Pipe) writes:
  13. >Hi,
  14. >
  15. >Suppose i have a pointer to a struture.
  16. >
  17. >Is there a way that I can store that pointer and others like it in an array
  18. >of integers ?
  19. >
  20. >Obviously, at some point I am going to want to convert the entry in the array
  21. >back to a pointer to the structure.
  22. >
  23. >Thanks in advance.
  24. >
  25. >chris dp. 
  26. >
  27. >--
  28. >-------------------------------------------------------------------------------
  29. > \_        \_ |
  30. > \_\_      \_ |  Chris Davis-Pipe    E-mail : chris@pact.srf.ac.uk
  31. > \_| \_    \_ |  PACT                   URL : http://www.pact.srf.ac.uk/~chris/
  32. > \_|   \_  \_ |  10 Priory Road         Tel : +44 117 9707178
  33. > \_|     \_\_ |  Bristol BS8 1TU        Fax : +44 117 9707171
  34. > \_| Niche \_ |
  35. >-------------------------------------------------------------------------------
  36.  
  37.  
  38. What do you gain by trying to convert a pointer to an int?  Why not store
  39. these struct pointers in an array of struct pointers?
  40.  
  41.             Fletcher.Glenn@ov.com
  42.  
  43.  
  44.